From: Ariel Glenn Date: Fri, 18 Nov 2011 09:08:29 +0000 (+0000) Subject: followup to r103448, tighten up code X-Git-Tag: 1.31.0-rc.0~26435 X-Git-Url: http://git.cyclocoop.org/%7D%7Cconcat%7B?a=commitdiff_plain;h=d23fe7bcc37fa231b9aabe8f5566edcd6581ca6f;p=lhc%2Fweb%2Fwiklou.git followup to r103448, tighten up code --- diff --git a/includes/Export.php b/includes/Export.php index 4521434e8b..dec604e5cd 100644 --- a/includes/Export.php +++ b/includes/Export.php @@ -614,17 +614,11 @@ class XmlDumpWriter { function writeContributor( $id, $text ) { $out = " \n"; - if ( $id ) { + if ( $id || !IP::isValid( $text ) ) { $out .= " " . Xml::elementClean( 'username', null, strval( $text ) ) . "\n"; $out .= " " . Xml::element( 'id', null, strval( $id ) ) . "\n"; } else { - if ( IP::isValid( $text ) ) { - $out .= " " . Xml::elementClean( 'ip', null, strval( $text ) ) . "\n"; - } - else { - $out .= " " . Xml::elementClean( 'username', null, strval( $text ) ) . "\n"; - $out .= " " . Xml::element( 'id', null, strval( $id ) ) . "\n"; - } + $out .= " " . Xml::elementClean( 'ip', null, strval( $text ) ) . "\n"; } $out .= " \n"; return $out;